package com.ryan.jmx;

import javax.management.MBeanServer;
import javax.management.MBeanServerFactory;
import javax.management.ObjectName;

public class HelloAgent {

	public static void main(String[] args) throws Exception{
		MBeanServer server = MBeanServerFactory.createMBeanServer();
		ObjectName helloName = new ObjectName("chengang:name=HelloWorld");
		server.registerMBean(new Hello(), helloName);
		
		
		ObjectName adapterName = new ObjectName("HelloAgent:name=htmladapter,port=8082");
		
//		server.registerMBean(adapter, adapterName);
//		adapter.start();
//		System.out.println("start...");
	}
}
